package com.tomorrow.weather.net;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class NetTools
{
	public static boolean isNetworkConnected(Context context)
	{
		ConnectivityManager connectivityManager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo localNetworkInfo = (NetworkInfo) connectivityManager.getActiveNetworkInfo();
		if (localNetworkInfo != null && localNetworkInfo.isAvailable())
		{
			return true;
		}
		return false;
	}
}
